/////////////////////////////////////////////////////////////////////////////
// Name:        epub_kewords.h
// Purpose:     Keyword provider for epub info
// Author:      Julian Smart
// Modified by:
// Created:     2008-11-18
// RCS-ID:      $Id$
// Copyright:   (c) Julian Smart
// Licence:     New BSD License
/////////////////////////////////////////////////////////////////////////////

#ifndef _EPUB_KEYWORDS_H_
#define _EPUB_KEYWORDS_H_

//#include "wx/dynarray.h"
//#include "wx/variant.h"
//#include "imageblock.h"
//#include "stringtable.h"
//#include "wbproperty.h"

#include "epubutils/epub_utils.h"
#include "coverdesigner/coverdesigner.h"

/*!
 * Special keyword provider for ePub basic info
 */

class ebEpubKeywordProvider: public cdKeywordProvider
{
public:
    ebEpubKeywordProvider(ebBasicInfo* info = NULL) { Init(); m_info = info; }
    ebEpubKeywordProvider(const ebEpubKeywordProvider& provider) { Copy(provider); }

    void SetInfo(ebBasicInfo* info) { m_info = info; }
    void Init() { m_info = NULL; }
    void operator=(const ebEpubKeywordProvider& provider) { Copy(provider); }
    void Copy(const ebEpubKeywordProvider& provider)  { m_info = provider.m_info; }

    /// Override to do subtitutions.
    virtual bool PerformSubstitutions(wxString& value) const;

    /// Override to list the available keywords. By default, uses the built-in keyword table.
    virtual wxArrayString EnumerateKeywords() const ;

    /// Override to get the value for a keyword.
    virtual wxString GetKeywordValue(const wxString& keyword) const;

    ebBasicInfo* m_info;
};

#endif
    // _EPUB_KEYWORDS_H_
